<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="cn.kgc.pojo.News"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/common.jsp" %>
<html>
	<head>
		<link href="<%=request.getContextPath() %>/css/common.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=request.getContextPath() %>/ckeditor/ckeditor.js"> </script>
	</head>
<body>
<%
//该页面为删除新闻的处理页面（1）获取要删除下新闻的ID（2）调用后台方法，根据ID将该新闻删除
//先把传过来的ID拿到
	int id = Integer.parseInt(request.getParameter("id"));
	
	request.setCharacterEncoding("utf-8");
	/* boolean flag = false;
	flag = newsService.deleteNewsById(id);
	
	if(flag){
		response.sendRedirect("newsDetailList.jsp");
	}else{
		response.sendRedirect("newsDelete.jsp");
	} */
	
	String flag = "failed";
	if(newsService.deleteNewsById(id)){
		flag = "success";
	}
	response.sendRedirect("newsDetailList.jsp?flag="+flag);
 %>

</body>
</html>